package edu.bluebeanforum.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.Api;
import lombok.Data;

import java.util.Date;
@Api("用户信息")
@Data
public class User {
    private Long id;

    private String username;
    @JsonIgnore
    private String password;

    private String nickname;

    private String phoneNum;

    private String email;

    private Byte gender;
    @JsonIgnore
    private String salt;
    @JsonInclude(JsonInclude.Include.ALWAYS)
    private String avatarUrl;

    private Integer articleCount;

    private Byte isAdmin;

    private String remark;


    private Byte state;
    @JsonIgnore
    private Byte deleteState;
    private Date createTime;
    private Date updateTime;

}


/**
 *
 *
 * JsonIgnore注解，，可以使对应的字段不参与序列化，
 *即不返回给前端   特别是密码   盐  等不应该返回给前端的
 *  序列化是什么意思呢？  序列化就是将java对象转成Json
 *
 */